push to a branch with a different name
nishio.iconI want to push local branch: X in Git to remote: upsteam branch: Y instead of remote: origin. What should I do in this situation?
gpt.icon
Branch push: To push a local branch X to a remote upstream branch Y, use the following command
$ git push upstream X:Y
Where X is the name of your local branch and Y is the name of the branch you want to push to the upstream remote.
---
This page is auto-translated from /nishio/違う名前のブランチにpush using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.